﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.LogEntries.IssueQuestStartLogEntry
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;
using TaleWorlds.SaveSystem;

#nullable disable
namespace TaleWorlds.CampaignSystem.LogEntries
{
  public class IssueQuestStartLogEntry : LogEntry
  {
    [SaveableField(10)]
    public readonly Hero IssueGiver;

    internal static void AutoGeneratedStaticCollectObjectsIssueQuestStartLogEntry(
      object o,
      List<object> collectedObjects)
    {
      ((LogEntry) o).AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      base.AutoGeneratedInstanceCollectObjects(collectedObjects);
      collectedObjects.Add((object) this.IssueGiver);
    }

    internal static object AutoGeneratedGetMemberValueIssueGiver(object o)
    {
      return (object) ((IssueQuestStartLogEntry) o).IssueGiver;
    }

    public override CampaignTime KeepInHistoryTime => CampaignTime.Weeks(1f);

    public IssueQuestStartLogEntry(Hero questGiver) => this.IssueGiver = questGiver;

    public override void GetConversationScoreAndComment(
      Hero talkTroop,
      bool findString,
      out string comment,
      out ImportanceEnum score)
    {
      score = ImportanceEnum.Zero;
      comment = "";
      if (this.IssueGiver != talkTroop)
        return;
      score = ImportanceEnum.SomewhatImportant;
      if (!findString)
        return;
      comment = "str_comment_quest_taken";
    }
  }
}
